package com.lhj.bootdemo.designmode.prototype;

/**
 * @author lhj
 * @version 1.0
 * @date 2022/5/13 2:04 下午
 * @description: 抽象的原型 Prototype
 */

public abstract class Shape implements Cloneable {

    private String id;
    protected String type;

    abstract void draw();


    public Object clone() {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
